import request from '@/utils/request'
import config from '@/utils/config'

// 分页查询商品信息
export function getGoodList(params) {
  return request({
    url: config.BaseUrl + '/goods/query/page',
    method: 'get',
    params: params
  })
}

// 新增商品
export function goodsAdd(params) {
  return request({
    url: config.BaseUrl + '/goods/add',
    method: 'post',
    data: params
  })
}

// 上架/下架
export function goodsEditStatus(params) {
  return request({
    url: config.BaseUrl + '/goods/edit/status',
    method: 'post',
    data: params
  })
}

// 查询商品详情
export function getGoodInfo(params) {
  return request({
    url: config.BaseUrl + '/goods/query/info',
    method: 'get',
    params: params
  })
}
